home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Kudos and Q's
- Sent: 5/28/96 11:03 AM
- Received: 5/28/96 11:31 AM
- From: Troy Gaul, tgaul@apple.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- >>The first more pragmatic question is: I don't really care about the "S",
- >>".xh" and ".xih" files that are the output of the SOM compiler, do I? This
- >>is just stuff to placate the linker and bind my calls, right?
- >>
- >.xh and .xih are just like .h files. You need the client of your library
- >to include the .xh file in order to call methods of your library. I am
- >not the best expert in SOM. I'll let someone else explain that to you.
-
- Actually, the .xh file is like a .h file. It contains the C++ mapping of
- the classes/methods/etc. in the .idl file so they can be called from C++
- (they don't call it simply .h because this is used for the C binding).
- You'll note that whenever a non-utility OpenDoc file is included, you're
- including the .xh file.
-
- The .xih file is actually an 'implementation' file. It contains the
- SOM-goo that the linker needs. Generally, you #include the .xih file
- from the main .cpp file for the SOM class (the .cpp file is also
- generated by somc, and then you fill in the methods). For a SOM class to
- be accessible from outside its own shared libarary, you need to export
- the xxxClassData symbol that is defined in the .xih file. Also, on the
- Mac, for a SOM object to be created by name, you need to include a
- properly formatted cfrg resource that lists the fully-qualified name of
- the class as one of the members.
-
- If you wish to distribute an interface to your SOM class to other people,
- you generally include the .idl, .xh, and optionally .h files. You also
- need to include a stub shared library for the client to link against.
- However, even if they don't have your .xh, it's possible for them to
- generate their own for the language of their choice. If you're using a
- direct-to-SOM compiler, I think all you need is the .idl (and the stub
- library).
-
- >>The second more pragmatic question is: Metrowerks CW9 binds ".idl" with the
- >>"SOMObjects TS" CodeWarrior plugin, does this mean the Finance SOM example
- >>could be reworked so it doesn't need the MPW make file (nb, the MPW
- >>'script' file)?
- >
- >Yes, you just need Toolserver.
-
- Of course, you need to make sure that ToolServer is set up correctly, and
- that you've put the standard SOM .idl include folder into your
- CodeWarrior search path.
-
- If you need any more information about the SOMobjects TS plug-in, let me
- know. I wrote it (based on the ToolFrontEnd code from Develop).
-
- _troy
-
- ......................................................................
- Troy Gaul tgaul@apple.com
- Apple Computer, Inc. OpenDoc Added Value Products
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-